import request from "@/utils/request";

// 查询岗位列表
export function listPost(query) {
  return request({
    url: "/v1/system/post/list",
    method: "get",
    params: query,
  });
}

// 查询岗位详细
export function getPost(post_id) {
  return request({
    url: "/v1/system/post/getById",
    method: "get",
    params: { post_id },
  });
}

// 新增岗位
export function addPost(data) {
  return request({
    url: "/v1/system/post/add",
    method: "post",
    data: data,
  });
}

// 修改岗位
export function updatePost(data) {
  return request({
    url: "/v1/system/post/update",
    method: "put",
    data: data,
  });
}

// 删除岗位
export function delPost(post_id) {
  return request({
    url: "/v1/system/post/delete",
    method: "post",
    data: { post_id },
  });
}

export function delPostByIds(ids) {
  return request({
    url: "/v1/system/post/deleteByIds",
    method: "post",
    data: { ids },
  });
}
